home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / x2ftp / msdos / memory / memman2b / memory.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-08-19  |  1.1 KB  |  51 lines

  1. /***    Turbo C Memory manager header
  2.         (c) R.J.Taylor 1993, 1994
  3. ***/
  4.  
  5. #ifndef MEMORY_IN
  6. #define MEMORY_IN
  7.  
  8. #ifndef NULL
  9.     #define NULL (void *)0
  10. #endif
  11.  
  12. /***    Useful typedefs
  13. ***/
  14. typedef unsigned mem_hand;
  15.  
  16. #ifndef ULONG_DEFINED
  17.     typedef unsigned long ulong;
  18.     #define ULONG_DEFINED
  19. #endif
  20.  
  21. #ifndef BYTE_DEFINED
  22. #ifndef NO_BYTE_REDEFINE
  23.     typedef unsigned char byte;
  24.     #define BYTE_DEFINED
  25. #endif
  26. #endif
  27.  
  28. /***    Memory manager access functions, allocate, free, put & get
  29. ***/
  30. mem_hand    xalloc      (unsigned bytes,unsigned depth);
  31. void        xfree       (mem_hand handle);
  32. int         xput        (byte far *p,unsigned n,mem_hand handle);
  33. byte far   *xget        (unsigned n,mem_hand handle);
  34.  
  35. /***    Memory handle information functions
  36. ***/
  37. unsigned    get_linewidth(mem_hand hand);
  38. unsigned    get_nlines   (mem_hand hand);
  39. ulong       get_memsize  (mem_hand hand);
  40. char       *mem_type     (mem_hand hand);
  41.  
  42. /***    Strategy selection
  43. ***/
  44. int         setXMstrat  (char *s);
  45. void        SetReadMode (mem_hand hand, int mode);
  46.  
  47. #define X_FAST 0
  48. #define X_SAFE 1
  49.  
  50. #endif
  51.